/*
 *
 */

#ifndef USER_PASSWORD_H
#define USER_PASSWORD_H

#include "user_common.h"
#if defined(GKT_CONFIG_KEYPAD_ENABLE) && GKT_CONFIG_KEYPAD_ENABLE

#ifdef GKT_CONFIG_USER_PASSWORD_ENROLL_SIMPLE_DISABLE
#define USER_PASSWORD_ENROLL_SIMPLE_DISABLE	\
	GKT_CONFIG_USER_PASSWORD_ENROLL_SIMPLE_DISABLE
#else
#define USER_PASSWORD_ENROLL_SIMPLE_DISABLE	0
#endif

#ifdef GKT_CONFIG_USER_PASSWORD_ENROLL_SIMILAR_DISABLE
#define USER_PASSWORD_ENROLL_SIMILAR_DISABLE	\
	GKT_CONFIG_USER_PASSWORD_ENROLL_SIMILAR_DISABLE
#else
#define USER_PASSWORD_ENROLL_SIMILAR_DISABLE	0
#endif

#ifdef GKT_CONFIG_USER_PASSWORD_ENROLL_SAME_DISABLE
#define USER_PASSWORD_ENROLL_SAME_DISABLE	\
	GKT_CONFIG_USER_PASSWORD_ENROLL_SAME_DISABLE
#else
#define USER_PASSWORD_ENROLL_SAME_DISABLE	0
#endif

struct _user_password_item {
	user_item_header_u	header;
	uint8_t	data_length;
	uint8_t	data[GKT_USER_PASSWORD_MAXSIZE];
} __ALIGNED(USER_ALIGNMENT);
typedef struct _user_password_item	user_password_item_s;
#define USER_PASSWORD_ITEM_SIZE	sizeof(user_password_item_s)

#define USER_PASSWORD_ITEM_C(item_index)	\
	(const user_password_item_s *)USER_ITEM_HEADER_C(&g_user_password.instance, item_index)

typedef struct _user_password {
	user_instance_s	instance;
	user_password_item_s	enroll_item;
} user_password_s;
extern user_password_s g_user_password;

extern user_type_info_s g_user_password_info;

#if GKT_USER_PASSWORD_DYNAMIC_ENABLE
#include "user_password_dynamic.h"
#endif

#endif

#endif	/* USER_PASSWORD_H */

